import 'package:ljy_p_app/common/repositories/data_result.dart';
import 'package:ljy_p_app/common/repositories/repository_ql.dart';

class UserRepository {


/// 获取阅读历史
static getHistoryRequest(page) async {
    RepositoryQL repo1 = RepositoryQL(
    issuesClosed: 10,
    issuesOpen: 2,
    issuesTotal: 12,
    reposName: "Klavis-AI",
    reposFullName: "username/AwesomeProject",
    ownerName: "klavis",
    ownerAvatarUrl: "https://img0.baidu.com/it/u=3184878129,3208611676&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=667",
    license: "MIT",
    forkCount: 5,
    starCount: 20,
    watcherCount: 15,
    isFork: false,
    isStared: true,
    hasIssuesEnabled: true,
    defaultBranch: "main",
    isSubscription: "subscribed",
    language: "Dart",
    size: 150,
    createdAt: "2023-01-01T12:00:00Z",
    pushAt: "2023-10-01T12:00:00Z",
    sshUrl: "git@github.com:username/AwesomeProject.git",
    htmlUrl: "https://github.com/username/AwesomeProject",
    shortDescriptionHTML: "Klavis Al (YC X25): MCP integration platformsthat let Al agents use tools reliably at any scale, A project that does awesome things. ",
    topics: ["flutter", "dart", "mobile"],
    parent: null,
  );

  RepositoryQL repo2 = RepositoryQL(
    issuesClosed: 5,
    issuesOpen: 1,
    issuesTotal: 6,
    reposName: "Alibaba_NLP",
    reposFullName: "anotheruser/AnotherRepo",
    ownerName: "DeepResearch",
    ownerAvatarUrl: "https://img1.baidu.com/it/u=2530732067,380783542&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=753",
    license: "Apache-2.0",
    forkCount: 10,
    starCount: 50,
    watcherCount: 30,
    isFork: true,
    isStared: false,
    hasIssuesEnabled: true,
    defaultBranch: "develop",
    isSubscription: "unsubscribed",
    language: "JavaScript",
    size: 250,
    createdAt: "2023-02-01T12:00:00Z",
    pushAt: "2023-10-05T12:00:00Z",
    sshUrl: "git@github.com:anotheruser/AnotherRepo.git",
    htmlUrl: "https://github.com/anotheruser/AnotherRepo",
    shortDescriptionHTML: "Tongyi Deep Research, the Leading Opensource Deep Research Agent, An example repository for demonstration.",
    topics: ["javascript", "nodejs"],
    parent: null,
  );

  RepositoryQL repo3 = RepositoryQL(
    issuesClosed: 20,
    issuesOpen: 3,
    issuesTotal: 23,
    reposName: "midday-ai",
    reposFullName: "sampleuser/SampleLibrary",
    ownerName: "Midday",
    ownerAvatarUrl: "https://img1.baidu.com/it/u=1570387165,3878250564&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=623",
    license: "GPL-3.0",
    forkCount: 7,
    starCount: 35,
    watcherCount: 25,
    isFork: false,
    isStared: true,
    hasIssuesEnabled: false,
    defaultBranch: "master",
    isSubscription: "subscribed",
    language: "Python",
    size: 100,
    createdAt: "2023-03-01T12:00:00Z",
    pushAt: "2023-09-15T12:00:00Z",
    sshUrl: "git@github.com:sampleuser/SampleLibrary.git",
    htmlUrl: "https://github.com/sampleuser/SampleLibrary",
    shortDescriptionHTML: "Invoicing, Time tracking, File reconciliation,Storage, Financial Overview &amp; your ownAssistant made for Freelancers, Library for sample purposes.",
    topics: ["python", "library"],
    parent: null,
  );

  RepositoryQL repo4 = RepositoryQL(
    issuesClosed: 0,
    issuesOpen: 5,
    issuesTotal: 5,
    reposName: "tongyi-UP",
    reposFullName: "experimentuser/NewExperiment",
    ownerName: "Tongyi",
    ownerAvatarUrl: "https://img0.baidu.com/it/u=359165079,3176594189&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=890",
    license: "None",
    forkCount: 2,
    starCount: 12,
    watcherCount: 8,
    isFork: false,
    isStared: false,
    hasIssuesEnabled: true,
    defaultBranch: "main",
    isSubscription: "unsubscribed",
    language: "Go",
    size: 85,
    createdAt: "2023-04-01T12:00:00Z",
    pushAt: "2023-10-10T12:00:00Z",
    sshUrl: "git@github.com:experimentuser/NewExperiment.git",
    htmlUrl: "https://github.com/experimentuser/NewExperiment",
    shortDescriptionHTML: "A new experiment in Go programming. A new experiment in Go programming.A new experiment in Go programming. A new experiment in Go programming.",
    topics: ["go", "experiment"],
    parent: null,
  );
    List<RepositoryQL?>? list = [repo1, repo2, repo3, repo4];

    return DataResult(list, true);
  }

}